# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
import django.utils.timezone
import autoslug.fields
import model_utils.fields
import django.db.models.deletion
import mptt.fields


class Migration(migrations.Migration):

    dependencies = [
        ('covers', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(verbose_name='ID', auto_created=True, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255, unique=True, verbose_name='name')),
                ('slug', autoslug.fields.AutoSlugField(max_length=255, editable=False, unique=True, populate_from='name')),
                ('description', models.TextField(verbose_name='description', blank=True)),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created date/time')),
                ('lft', models.PositiveIntegerField(db_index=True, editable=False)),
                ('rght', models.PositiveIntegerField(db_index=True, editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(db_index=True, editable=False)),
                ('cover', models.OneToOneField(on_delete=django.db.models.deletion.SET_NULL, null=True, to='covers.Cover', verbose_name='cover', blank=True)),
                ('parent', mptt.fields.TreeForeignKey(on_delete=django.db.models.deletion.SET_NULL, null=True, to='categories.Category', related_name='children', verbose_name='parent category', blank=True)),
            ],
            options={
                'verbose_name': 'Category',
                'verbose_name_plural': 'Categories',
                'ordering': ('-created', 'name'),
            },
        ),
    ]
